home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr14 / text_ref.zip / MS-DOS.TXT < prev    next >
Text File  |  1995-01-19  |  35KB  |  890 lines

  1.                          Computer Help References
  2.                              version 1.19.95
  3.  
  4. ────────────────────────────────────────────────────────────────────────────
  5.                              M  S  -  D  O  S
  6. ────────────────────────────────────────────────────────────────────────────
  7.  
  8. As new information is added, it will appear at the beginning of each
  9. specific section.  All new information will have the date it was added in
  10. the header.  If you find something you've read before that is marked as a
  11. new addition, it is due to a correction, or addition to that topic.
  12.  
  13. ────────────────────────────────────────────────────────────────────────────
  14.  
  15. Updating Time and Date Stamps on Files
  16. ======================================
  17. -> Added on January 3, 1995
  18.  
  19. If you'd like to update the date/time stamp on your files, the following
  20. simple DOS command will update all the files in your current directory to
  21. your current system's date and time.
  22.  
  23.     for %x in (*.*) do copy /b %x+,,
  24.  
  25. Before you run the above command set the date and time on your system to
  26. whatever you wish, change to your DOS directory, run the command above, and
  27. then change the date and time back to current.
  28.  
  29. The "/b" (binary) parameter is extremely important.  It tells DOS to ignore
  30. the end-of-file character (ASCII character 26) and copy the entire file.  The
  31. "+,," on the end of the command forces DOS to copy a file in place without
  32. returning the error message:
  33.  
  34.    File cannot be copied onto itself
  35.         0 file(s) copied
  36.  
  37. (BTW, the "COPY /B filename.ext+,," command is documented in old DOS manuals
  38. as far back as v3.nn).
  39.  
  40. * Vernon.Frazee@f71.n135.z1.fidonet.org
  41.   or FidoNet: 1:135/71
  42.  
  43. ────────────────────────────────────────────────────────────────────────────
  44.  
  45. MS-DOS Error Levels on Various Commands
  46. =======================================
  47. -> Added on January 3, 1995
  48.  
  49. COMMAND:   ERROR-    DOS      MEANING:
  50.            LEVEL:    VER.
  51. -------    ------    ---      ----------------------------------------------
  52. BACKUP       0       3.2+     The backup was successful.
  53.              1        "       No files were found to back up.
  54.              2        "       Some files were not backed up because of
  55.                               file-sharing conflicts.
  56.              3        "       The user pressed CTRL+C to stop the process.
  57.              4        "       The process stopped because of an error.
  58.  
  59. DISKCOMP     0      4.01+     The disks are the same.
  60.              1        "       Differences were found.
  61.              2        "       The user pressed CTRL+C to stop the process.
  62.              3        "       A hard error occurred.
  63.              4        "       An initialization error occurred.
  64.  
  65. DISKCOPY     0      4.01+     The copy operation was successful.
  66.              1        "       A nonfatal read/write error occurred.
  67.              2        "       The user pressed CTRL+C to stop the process.
  68.              3        "       A fatal hard error occurred, unable to read
  69.                               the source disk or format the target disk.
  70.              4        "       An initialization error occurred. There is not
  71.                               enough memory - invalid drives or command line
  72.                               syntax.
  73.  
  74. FIND         0       6.0      At least one occurence has been found.
  75.              1        "       No occurence has been found.
  76.              2        "       The search was not completed, due to break or
  77.                               error.
  78.  
  79. FORMAT       0       3.2+     The format operation was successful.
  80.              3        "       The user pressed CTRL+C to stop the process.
  81.              4        "       A fatal error occurred (any error other than
  82.                               0,3, or 5)
  83.              5        "       The user pressed N in response to the prompt
  84.                               "Proceed with Format (Y/N)?" to stop the process.
  85.  
  86. GRAFTABL     0      4.01+     Character set was loaded successfully; no
  87.                               previous code page was loaded.
  88.              1        "       Character set was already loaded and
  89.                               replaced by new table.
  90.              2        "       A file error occurred.
  91.              3        "       An incorrect parameter was specified; no
  92.                               action was taken.
  93.              4        "       An incorrect version of MS-DOS is in use;
  94.                               version 5.0 is required.
  95.  
  96. KEYB         0       5.0+     Keyboard definition file was loaded
  97.                               successfully.
  98.              1        "       Invalid keyboard code, code page, or syntax
  99.                               was used.
  100.              2        "       Keyboard definition file is bad or missing.
  101.              4        "       An error occurred while communicating with
  102.                               the CON device.
  103.              5        "       The requested code page has not been prepared.
  104.  
  105. REPLACE      0      4.01+     Replace successfully replaced or added the
  106.                               files.
  107.              1        "       Command line error.
  108.              2       3.2+     Replace could not find the source files.
  109.              3        "       Replace could not find the source or destination
  110.                               path.
  111.              5        "       The user does not have access to the files you
  112.                               want to replace.
  113.              8        "       There is insufficient system memory to carry
  114.                               out the command.
  115.             11        "       The user used the wrong syntax on the command
  116.                               line.
  117.             15      4.01      Invalid drive.
  118.            Other      "       Standard MS-DOS error.
  119.  
  120. RESTORE      0       3.2+     Restore successfully restored the file or files.
  121.              1        "       Restore could not find the files to restore.
  122.              2       3.2      Some files not restored due to sharing conflicts.
  123.              3       3.2+    The user pressed CTRL+C to stop the restoring
  124.                               operation.
  125.              4        "       Restore stopped because of an error.
  126.  
  127. SETVER       0     5 Only     Setver successfully completed its task.
  128.              1        "       The user specified an invalid command switch.
  129.              2        "       The user specified an invalid filename.
  130.              3        "       There is insufficient system memory to carry
  131.                               out the command.
  132.              4        "       The user specified an invalid version-number
  133.                               format.
  134.              5        "       Setver could not find the specified entry in
  135.                               the version table.
  136.              6        "       Setver could not find the SETVER.EXE file.
  137.              7        "       The user specified an invalid drive.
  138.              8        "       The user specified too many command-line
  139.                               parameters.
  140.              9        "       Setver detected missing command-line parameters.
  141.             10        "       Setver detected an error while reading the
  142.                               SETVER.EXE file.
  143.             11        "       The SETVER.EXE file is corrupt.
  144.             12        "       The specified SETVER.EXE file does not support
  145.                               a version table.
  146.             13        "       There is insufficient space in the version
  147.                               table for a new entry.
  148.             14        "       Setver detected an error while writing to the
  149.                               SETVER.EXE file.
  150.  
  151. XCOPY        0      4.01+     Files were copied without error.
  152.              1        "       No files were found to copy.
  153.              2      4.01      Control+C entered by user to terminate xcopy.
  154.              3       5.0      The user pressed CTRL+C to terminate xcopy.
  155.              4      4.01+     Initialization error occurred.  There is not
  156.                               enough memory or disk space, or you entered
  157.                               an invalid drive name or invalid syntax on
  158.                               the command line.
  159.              5      4.01      Int 24 error occurred. The user aborted from
  160.                               INT 24 error reading or writing disk.
  161.              5       5.0      Disk write error occurred.
  162.  
  163.  
  164. It is known that MS-DOS 6.x returns errorlevels for several other DOS
  165. utilities.  These include:  CHKDSK; CHOICE; DEFRAG; DELTREE; MOVE; MSAV; and
  166. SCANDISK.  Please refer to MS-DOS online HELP for further details.
  167.  
  168. If anyone knows of any other MS-DOS commands which return errorlevels, or has
  169. additional information regarding those listed here.  I would appreciate a
  170. message with detailed information.  This will permit me to update this list
  171. and publish ERRLVL12.TXT!
  172.  
  173. * gary.cooper.@f15.n255.z1.fidonet.org
  174.   or FidoNet: 1:255\15.0  and  1:255\12.0
  175.  
  176. ────────────────────────────────────────────────────────────────────────────
  177.  
  178. Undocumented and Obscure Features MS-DOS
  179. ========================================
  180. -> Added on January 3, 1995
  181.  
  182. --------
  183. TRUENAME
  184. --------
  185.  
  186. Internal DOS 5.0 command.  Canonicalize a filename or path (using DOS
  187. interrupt 21h, function 60) prints the actual directory.
  188.  
  189.      Syntax:
  190.  
  191.      TRUENAME filename   - Prints the complete path to file.
  192.      TRUENAME directory  - Prints the complete path to directory.
  193.  
  194. Note:  If the path is in a network, it starts with a \\machine-name.
  195.  
  196. TRUENAME is analogous to the UNIX "whence" command.  It returns the real
  197. fully-qualified path name for a command.
  198.  
  199. TRUENAME is useful in networks, where a physical drive may be mapped to a
  200. logical volume, and the user needs to know the physical location of the file.
  201. It ignores the DOS SUBST and JOIN commands, or network MAPped drives.
  202.  
  203. TRUENAME is an undocumented MS-DOS feature, but it is documented in JP
  204. Software's 4DOS software (COMMAND.COM replacement) as follows:
  205.  
  206.      Syntax:
  207.  
  208.      TRUENAME [d:][path]filename
  209.  
  210.      Purpose:
  211.  
  212.      Returns a fully qualified filename.
  213.  
  214.      Comments:
  215.  
  216.      TRUENAME will see "through" JOIN and SUBST commands, and
  217.      requires MS-DOS 3.0 or above.
  218.  
  219.      Example:
  220.  
  221.      The following command uses TRUENAME to get the true pathname
  222.      for a file:
  223.  
  224.      c:\>subst d: c:\util\test
  225.      c:\>truename d:\test.exe
  226.  
  227.      c:\util\test\test.exe
  228.  
  229. TRUENAME : will reveal the full name drive and path of the filename.  If you
  230. specify a wildcard (*) in the filename, it will expand the filename to use
  231. question marks instead.  If the path includes the ..\ sequence, TRUENAME will
  232. examine the directory structure and calculate the path.
  233.  
  234. Stranger still, the line:
  235.  
  236.      TRUENAME \CRONK\FLIBBET\..\ART
  237.  
  238. ...produces the response:
  239.  
  240.      C:\CRONK\ART
  241.  
  242. ...even if the directories \CRONK\FLIBBET and the file ART don't exist!
  243. Don't expect this command to work well across networks.  After all, this is
  244. still undocumented in MS-DOS for a reason!
  245.  
  246.  
  247.  -------------
  248.  FDISK /STATUS
  249.  -------------
  250.  
  251. Prints a screen just like using option 4 of FDISK, "Partition information",
  252. but includes extended partition information.  Nice if you want to get an
  253. overview without fear of pressing the wrong keys.
  254.  
  255. Doesn't work in DOS 3.30.
  256.  
  257.  
  258.  ----------
  259.  FDISK /MBR
  260.  ----------
  261.  
  262. MS-DOS 5.0 FDISK has an undocumented parameter, /MBR, that causes it to write
  263. the master boot record to the hard disk without altering the partition table
  264. information.  While this feature is not documented, it can be told to
  265. customers on a need-to-know basis.
  266.  
  267. Warning:  Writing the master boot record to the hard disk in this manner can
  268. make certain hard disks partitioned with SpeedStor unusable.  It can also
  269. cause problems for some dual-boot programs, or for disks with more than 4
  270. partitions.  Specific information is below.
  271.  
  272. What is the MBR?
  273.  
  274. At the end of the ROM BIOS bootstrap routine, the BIOS will read and execute
  275. the first physical sector of the first floppy or hard drive on the system.
  276. This first sector of the hard disk is called the master boot record, or
  277. sometimes the partition table or master boot block.  At the beginning of this
  278. sector of the hard disk is a small program.  At the end of this sector is
  279. where the partition information, or partition table, is stored.  This program
  280. uses the partition information to determine which partition is bootable
  281. (usually the first primary DOS partition) and attempts to boot from it.
  282.  
  283. This program is what is written to the disk by FDISK /MBR and is usually
  284. called the master boot record.  During normal operation, FDISK only writes
  285. this program to the disk if there is no master boot record.
  286.  
  287. Why is the MBR changed during Setup?
  288.  
  289. During installation of Microsoft MS-DOS 5 Upgrade, Setup will replace the
  290. master boot record on the hard disk with code to display the message:
  291.  
  292.         The MS-DOS 5.0 Setup was not completed.
  293.         Insert the UNINSTALL #1 diskette in drive A.
  294.         Press the ENTER key to continue.
  295.  
  296. This message should be erased and the master boot code rewritten before Setup
  297. is completed. If a problem occurs during Setup and you return to the previous
  298. MS-DOS, UNINSTAL should also remove this message. However, should Setup or
  299. UNINSTAL fail to remove this message, or should the master boot record become
  300. corrupted, a new master boot record can be written to the disk using the
  301. following command:
  302.  
  303.          C:\>fdisk /mbr
  304.  
  305.      WARNINGS:
  306.  
  307.      This option should not be used if:
  308.  
  309.         - the disk was partitioned using Storage Dimensions'
  310.           SpeedStor utility with its /Bootall option
  311.         - more than 4 partitions exist
  312.         - certain dual-boot programs are in use
  313.  
  314. Storage Dimensions' SpeedStor utility using the /Bootall option redefines the
  315. drive's physical parameters (cylinder, head, sector).  /BOOTALL stores
  316. information on how the drive has been changed in an area of the master boot
  317. record that MS-DOS does not use. FDISK /MBR will erase that information,
  318. making the disk unusable.
  319.  
  320. Some older OEM versions of MS-DOS and some third-party partitioning utilities
  321. can create more than 4 partitions.  Additional partition information is
  322. commonly stored information on partitions in an area that FDISK /MBR will
  323. overwrite.
  324.  
  325. Some dual-boot programs have a special MBR that asks the user which operating
  326. system they want on bootup.  FDISK /MBR erases this program.  Dual-boot
  327. systems that boot whichever partition is marked Active are not affected by
  328. FDISK /MBR.
  329.  
  330. If you have a Boot Sector Virus, just boot from a known "clean" floppy disk
  331. that's write protected and which has FDISK on it, and run FDISK /MBR.
  332.  
  333.  
  334.  --------------------------
  335.  SHELL=C:\COMMAND.COM /P /F
  336.  --------------------------
  337.  
  338. The /F in the CONFIG.SYS SHELL= statement forces a "Fail" response to all
  339. "Abort, Retry, Fail" prompts issued by the DOS critical error handler.
  340.  
  341.  
  342.  ----------
  343.  COMMAND /F
  344.  ----------
  345.  
  346. Entered on the command line, COMMAND /F makes all those annoying "Abort,
  347. Retry, Ignore, Fail" disk error messages default to "Fail" from then on until
  348. rebooting.
  349.  
  350.  
  351.  ----------
  352.  COMMAND /P
  353.  ----------
  354.  
  355. For DOS 3.30 (not checked with other versions):  Docs say that this doesn't
  356. allow you to exit back to the previous shell, but /P also forces AUTOEXEC.BAT
  357. to be run on secondary shells.
  358.  
  359.  
  360.  ----------
  361.  COMMAND /D
  362.  ----------
  363.  
  364. When used with a primary shell, or secondary with /P, prevents execution of
  365. AUTOEXEC.BAT.
  366.  
  367.  
  368.  ------
  369.  VER /R
  370.  ------
  371.  
  372. Yields extended information about the DOS version:
  373.  
  374.      MS-DOS Version 5.00
  375.      Revision A
  376.      DOS is in HMA
  377.  
  378. Doesn't work with DOS 3.30.  VER /R is a documented feature of JP Software's
  379. 4DOS.
  380.  
  381.  
  382.  --------------------
  383.  ECHO OFF and ECHO ON
  384.  --------------------
  385.  
  386. Entering ECHO OFF from the command line erases the prompt and leaves just a
  387. cursor on the screen.  ECHO ON from the command line restores the prompt.
  388. This works with all version of DOS.
  389.  
  390. One of the most frequently asked questions is "How do I ECHO a blank line in
  391. a batch file?"  The most common answer is to use ECHO directly followed by a
  392. period:  ECHO. like so.  However, just about any "white space" character will
  393. work, as well as any "delimiter".  The following alternatives can be used:
  394. ECHO.  ECHO"  ECHO,  ECHO:  ECHO;  ECHO[  ECHO]  etc.  Apparently it's just
  395. the way that the command handles the delimiter and has been available from
  396. way back!  Microsoft just began mentioning it in the documentation recently,
  397. though, and their examples use a period.
  398.  
  399.  
  400.  ----------------
  401.  FORMAT /AUTOTEST
  402.  ----------------
  403.  
  404. The autotest parameter will allow FORMAT to proceed, checking the existing
  405. format of the disk (unless the /U parameter with DOS 5 or 6 is also present),
  406. and proceeding with the format.
  407.  
  408. All this will take place with no delay and no waiting for user input.  It
  409. will also end without pausing.  It will not ask for a volume label or whether
  410. to format another diskette.
  411.  
  412. WARNING!  This procedure will also work on hard drives!  Be very cautious if
  413. you plan to use this feature!
  414.  
  415.  
  416.  --------------
  417.  FORMAT /BACKUP
  418.  --------------
  419.  
  420. This works exactly like /AUTOTEST, but it does ask for a volume label.
  421.  
  422.  
  423.  --------------
  424.  FORMAT /SELECT
  425.  --------------
  426.  
  427. This is like the DOS MIRROR command... For safety-fanatics only.
  428.  
  429.  
  430.  -----------------
  431.  FORMAT /SELECT /U
  432.  -----------------
  433.  
  434. Just makes a disk unreadable.  Guess it could be handy?
  435.  
  436.  
  437.  ---------
  438.  FORMAT /H
  439.  ---------
  440.  
  441. In DOS 3.30 (not tested with other versions), FORMAT /H will cause the format
  442. to begin immediately after pressing Y in response to "Format another", rather
  443. than displaying "Place disk to be formatted in drive x: and press Enter" on a
  444. second and subsequent disks.
  445.  
  446. In DOS 5.0, FORMAT reports "invalid switch".
  447.  
  448.  
  449.  ----------------------------------------------------------------
  450.  IF EXIST <dirname>\NUL <command> and IF EXIST EMMXXXX0 <command>
  451.  ----------------------------------------------------------------
  452.  
  453. This is a handy quirk of DOS.  Installable drivers are seen as files in all
  454. directories.  You can use the if exist test to either test for the existence
  455. of a directory, with "if exist <dirname>\nul", which fails if the directory
  456. does not exist because the nul device is not found; or to test whether any
  457. driver is loaded, such as the DOS 5 or 6 EMM386 memory manager.
  458.  
  459. Caveats:  For testing NUL, you need to know the name of the directory or the
  460. driver whose existence you are testing, and this is MS-DOS specific -- it
  461. doesn't work on network drives, and may not work under DR-DOS.
  462.  
  463. Where did you learn the "EMMXXXX0" name from?  Instead of typing MEM /C, type
  464. MEM /D for the "debug" listing.
  465.  
  466. The only trouble is EXISTS returns true for COM3/4 and LPT2/3 even if the
  467. hardware does not exist.
  468.  
  469.  
  470.  --------------------------------
  471.  Using ATTRIB to hide directories
  472.  --------------------------------
  473.  
  474. The DOS 5.0 and 6.0 ATTRIB command can do the same thing for directories as
  475. it can for files:  ATTRIB +H <dirname>  will hide the named directory.
  476.  
  477.  
  478.  -----------
  479.  SWITCHES=/W
  480.  -----------
  481.  
  482. Enables you to have the Windows 3.0 WINA20.386 file anywhere on your boot
  483. drive.  Without this you have to have it in the root directory.
  484.  
  485. This should not be used with Windows 3.1, since it appears to waste around
  486. 120K of UMBs.
  487.  
  488.  
  489.  -----------------------
  490.  FOR %%V IN (/SOMETHING)
  491.  -----------------------
  492.  
  493. How can a batch file (without 4DOS) determine from which drive it has been
  494. started?
  495.  
  496.       Example:  C:\>a:test.bat
  497.  
  498. Now my batch should be able to find out that it is located on drive A: (not
  499. the path, only the drive!).
  500.  
  501. In a batch file, the variable %0 contains the name of the batch file as it
  502. was typed at the command line.  If you run the batch file as A:TEST.BAT, %0
  503. will be "A:TEST.BAT".  If you have the directory on your path, and simply
  504. type TEST, then %0 will be "TEST".  The drive, path, and extension will only
  505. appear in %0 if you enter them in the command used to call the batch file
  506. (either typed at the command line, or called from another batch file).  So,
  507. you must specify the drive as part of the batch filename for this to work.
  508.  
  509. To extract the drive only from %0, use the undocumented FOR %%V in /SOMETHING
  510. command:
  511.  
  512.      set drive=
  513.      for %%v in (/%0) do call test2 %%v
  514.      echo Calling drive is %drive%
  515.  
  516. ...where TEST2.BAT is:
  517.  
  518.      if not '%drive%'=='' set drive=%1:
  519.  
  520. FOR %%V IN (/SOMETHING) DO WHATEVER will do WHATEVER twice -- the first time
  521. with %%V set to the first character in SOMETHING ("S"), the second time with
  522. all the remaining characters in SOMETHING ("OMETHING").  If SOMETHING is only
  523. a single character, WHATEVER will only be called once, with that character in
  524. %%V.  If the single character is a wildcard (? or *) that wild card will not
  525. be expanded to a set of filenames.  (The main purpose of this feature is
  526. apparently to allow inclusion of the literal characters "?" and "*" without
  527. them being expanded.)
  528.  
  529. This works in DOS 3.30 and later.
  530.  
  531.  
  532.  ----
  533.  DIR,
  534.  ----
  535.  
  536. Using a comma immediately after DIR shows ALL files, including the HIDDEN
  537. ones.
  538.  
  539. This appears only to work with DOS 5.0 and 6.0.  With 3.30, it doesn't
  540. display either IO.SYS, MSDOS.SYS (both with S, H and R attribs) or a test
  541. file with A and H attribs.
  542.  
  543. With DOS 5.0, it displayed a test file with H and A, but would not display
  544. IO.SYS or MSDOS.SYS with S, H and R.  This isn't surprising actually, since
  545. S alone (without H) will prevent inclusion of a file in a normal DIR.
  546.  
  547. Not tested with DOS 4.x.  Not supported by JP Software's 4DOS.
  548.  
  549.  
  550.  --------
  551.  COPY. A:
  552.  --------
  553.  
  554. The use of a period IMMEDIATELY after some DOS statements will work just like
  555. *.*
  556.  
  557.      Examples:  DEL.      (erase all files in current directory)
  558.                 COPY. A:  (copy all files in current directory to A:)
  559.  
  560. There may be more statements with which it works.
  561.  
  562. This is actually a documented although obscure feature, though the ability to
  563. use the period with COPY is not documented.  What is documented is the fact
  564. that "." and ".." can be used to represent the current and parent directories
  565. respectively, and these will work with many applications which can handle
  566. directory names as arguments.  In this case the "." could also be viewed as a
  567. replacement for "*.*"
  568.  
  569.  
  570.  ---------
  571.  DOS?=HIGH
  572.  ---------
  573.  
  574. DOS?=HIGH in CONFIG.SYS with DOS 6.0 will prompt you whether to load the DOS
  575. kernel high (into the HMA) or not.
  576.  
  577.  
  578.  -----------
  579.  INSTALLHIGH
  580.  -----------
  581.  
  582. In DOS 6.0, there is an undocumented CONFIG.SYS command called INSTALLHIGH=
  583. which works just like INSTALL= but loads the TSR high (into upper memory).
  584.  
  585. The only drawback to this is that MemMaker will not touch INSTALLHIGH lines
  586. during the optimizing process.  It just takes it as it is currently.  But
  587. then again, INSTALL= is ignored too.  All in all, INSTALL and INSTALLHIGH
  588. really are commands to set up manually by the user, and are not really
  589. recommended for normal use.  Load TSRs at the beginning of AUTOEXEC.BAT (and
  590. using LOADHIGH if desired).
  591.  
  592.        Example:
  593.  
  594.        DOS=HIGH,UMB
  595.        DEVICE=C:\DOS\HIMEM.SYS
  596.        DEVICE=C:\DOS\EMM386.EXE NOEMS
  597.        INSTALLHIGH=C:\DOS\SHARE.EXE
  598.  
  599.  
  600.  -------------------------------
  601.  Using : for batch file comments
  602.  -------------------------------
  603.  
  604. DOS uses a leading : to indicate a label in a batch file.  If the next
  605. character following the : is a space or other non-alphanumeric character,
  606. then DOS will decide it's an invalid label and skip to the next line,
  607. performing no further action.  Faster batch file processing is achieved using
  608. this method for comments instead of REM commands.
  609.  
  610.  
  611.  --------------------------------------
  612.  REM in lines with pipes or redirection
  613.  --------------------------------------
  614.  
  615. For example:  REM echo y | del *.*
  616.  
  617. Problems are encountered when trying to REM out an "echo y | del *.*" line in
  618. a batch file.  The problem appears to only occur if there is a pipe or
  619. redirection in the REMed out line, which shows that DOS first reads the
  620. entire line and processes pipes and redirections first, and then goes back to
  621. find out what to do with them in the line.  It's actually doing what it
  622. thinks you've told it:  Piping the output of REM to DEL.  Since REM has no
  623. output, DEL hangs, waiting for the answer to its question.
  624.  
  625.  
  626.  -------------------
  627.  Delimiter character
  628.  -------------------
  629.  
  630. Prior to DOS 5.0, there was an undocumented DOS function that would allow you
  631. to set the DOS option delimiter character to something else, like a dash (-).
  632. Once you did this, you could use either \ or / in PATH specifications.
  633.  
  634. DOS 5.0 removed the function to set the option delimiter, but retained the
  635. function to query what it currently is.
  636.  
  637. (Unfortunately, no further details were provided in this file, so not sure if
  638. the delimiter character can still be changed somehow.)
  639.  
  640. * jamie.hermans@tech-spk.alive.ampr.ab.ca
  641.   or FidoNet: Jamie Hermans @ 1:342/707
  642.  
  643. ────────────────────────────────────────────────────────────────────────────
  644.  
  645. Speed-Up Keyboard Entry
  646. =======================
  647. -> Added on October 30, 1994
  648.  
  649. Enter the following line in your AUTOEXEC.BAT or at the DOS prompt to speed
  650. up keyboard response time when holding down any repeating key.
  651.  
  652.     C:\DOS\MODE.COM CON RATE=32 DELAY=1
  653.  
  654. * jamie.hermans@tech-spk.alive.ampr.ab.ca
  655.   or FidoNet: Jamie Hermans @ 1:342/707
  656.  
  657. ----------------------------------------------------------------------------
  658.  
  659. Renaming Directories
  660. ====================
  661. -> Added on October 30, 1994
  662.  
  663. Ever wonder why you gave a directory such a cryptic name?  Don't want to
  664. go through the hassle of copying everything to a new directory and deleting
  665. the old one just to change the name?  Use DOS 6.0+'s new MOVE command.
  666.  
  667.     MOVE C:\OLD-DIR C:\NEW-DIR
  668.  
  669. The above will rename OLD-DIR to NEW-DIR without touching the files inside.
  670.  
  671. * jamie.hermans@tech-spk.alive.ampr.ab.ca
  672.   or FidoNet: Jamie Hermans @ 1:342/707
  673.  
  674. ────────────────────────────────────────────────────────────────────────────
  675.  
  676. Installing MS-DOS
  677. =================
  678. -> Added on October 30, 1994
  679.  
  680. Maybe you've found yourself in this situation.  You buy a new computer and
  681. of course it comes with MS-DOS 6.0 on it, but no disks.  You get the stepup
  682. upgrade for free from your local BBS or from the MSDL service.  Everything's
  683. okey dokey!  One day for some reason you format the HD and want to
  684. re-install everything from scratch.  Whoops!!  MS-DOS stepup says it's only
  685. intended for computers that already have a copy of DOS on it.  What next?
  686. You don't have the original disks, so do you have to go and buy an OEM copy
  687. of MS-DOS?  NO!  Save your money and follow these steps.
  688.  
  689. Boot up with disk 1 of the Stepup set.  When you get to the opening screen,
  690. press "F3" to exit to DOS.  If you need to set up partitions, run FDISK.EXE.
  691. If you make any changes, the computer will reboot ... leave the disk in and
  692. go back to the beginning of this paragraph.
  693.  
  694. Type "FORMAT C: /S /U" This will format drive C: unconditionally (doesn't
  695. leave an Undelete file sitting around) and write the system files to the
  696. drive.  Once everything is done, simply reboot with disk 1 in the drive and
  697. voila.  The upgrade version of MS-DOS is tricked into thinking you already
  698. have a version of DOS installed and goes happily along it's way.
  699.  
  700. * Terry Laskiwski @ 1:342/14
  701.  
  702. ────────────────────────────────────────────────────────────────────────────
  703.  
  704. Upgrading MS-DOS
  705. ================
  706. -> Added on October 30, 1994
  707.  
  708. If you've ever upgraded MS-DOS, you know it wants you to have two disks
  709. ready for backing your current DOS.  Point is, you can have it backed up to
  710. the hard drive instead saving MUCH time.  Simply type "A:SETUP /G" instead
  711. of "A:SETUP", and you won't be prompted for disks.
  712.  
  713. Once you've rebooted and eveything is working fine, go to the C:\ prompt and
  714. type DELOLDOS -- this removes the old copy of your DOS and you're all
  715. finished.  Be sure everything works though, once you type DELOLDOS, there's
  716. no turning back!
  717.  
  718. * jamie.hermans@tech-spk.alive.ampr.ab.ca
  719.   or FidoNet: Jamie Hermans @ 1:342/707
  720.  
  721. ────────────────────────────────────────────────────────────────────────────
  722.  
  723. Delete ANYTHING
  724. ===============
  725. -> Added on October 30, 1994
  726.  
  727. Have a directory with a bunch of subdirectories that you want to remove?
  728. Have a file with some attributes set and don't want to take the time to
  729. reverse them?  Use MS-DOS 6.0+'s new DELTREE command.  It works both on
  730. files and directories, regardless of content or attribute.  Don't want to
  731. be asked for confirmation?  Use "DELTREE /Y filename.ext" for a file and
  732. "DELTREE /Y dirname" for a directory and it's contents.
  733.  
  734. * PC Computing - August 1994
  735.  
  736. ────────────────────────────────────────────────────────────────────────────
  737.  
  738. Changing Directories
  739. ====================
  740. -> Added on October 30, 1994
  741.  
  742. You have to picture your hard drive as a BIG tree with the root drive being
  743. at the top.  Each subdirectory you go into is one level down from the
  744. previous one, kind of like going to a lower branch on the tree.  Picture
  745. this in your mind for the next tip.
  746.  
  747. * Bob Miller @ 1:101/535
  748.  
  749. There are two shortcuts for moving up directory paths.  Use "CD.." to go up
  750. one level.  Use "CD..." to go up two levels.  Unfortunately, this doesn't
  751. work with four or more periods.
  752.  
  753. To go right to the top (a.k.a. the root directory), type "CD\".
  754.  
  755. * PC Computing - August 1994
  756.  
  757. ────────────────────────────────────────────────────────────────────────────
  758.  
  759. Non-Confirming Delete
  760. =====================
  761. -> Added on October 30, 1994
  762.  
  763. For those times when you KNOW that you want to delete some files and don't
  764. want to be asked, use "ECHO Y | DEL *.*" or whatever wildcards / filename
  765. you want, and it'll silently remove your files.
  766.  
  767. * PC Computing - August 1994
  768.  
  769. ────────────────────────────────────────────────────────────────────────────
  770.  
  771. "DIR" Command Line Switches
  772. ===========================
  773. -> Added on October 30, 1994
  774.  
  775.     ,    Lists everything in the current directory regardless of attributes
  776.     /P   Pauses after each screenful of information.
  777.     /W   Uses wide list format.
  778.     /A   Displays files with specified attributes.
  779.          D Directories   R Read-only files          H Hidden files
  780.          S System files  A Files ready to archive   - Prefix meaning "not"
  781.     /O   List by files in sorted order.
  782.          N By name (alphabetic)        S By size (smallest first)
  783.          E By extension (alphabetic)   D By date & time (earliest first)
  784.          G Group directories first     - Prefix to reverse order
  785.          C By compression ratio (smallest first)
  786.     /S   Displays files in specified directory and all subdirectories.
  787.     /B   Uses bare format (no heading information or summary).
  788.     /L   Uses lowercase.
  789.  
  790. * PC Computing - August 1994
  791.  
  792. ────────────────────────────────────────────────────────────────────────────
  793.  
  794. Clean & Selective Booting
  795. =========================
  796. -> Added on October 30, 1994
  797.  
  798. MS-DOS 6.0+ comes with many new features.  One of them reduces the need for
  799. a specialized boot disk (SEE THE NOTE BELOW !!).  Simply hold down F5 when
  800. you see the message "Starting MS-DOS" and CONFIG.SYS & AUTOEXEC.BAT are
  801. bypassed.  If you only want to skip one line in either startup file, hold
  802. F8 and you will be prompted to run each line on a line-by-line basis.
  803.  
  804. NOTE: CONFIG.SYS only is stepped in DOS 6.0
  805.       CONFIG.SYS & AUTOEXEC.BAT are stepped in DOS 6.2+
  806.  
  807. * PC Computing - August 1994
  808.  
  809. This tip does NOT eliminate the need for a SAFETY boot disk.  Although you
  810. can create different booting sequences, bypassing the start-up files isn't
  811. going to help if COMMAND.COM get corrupted or a virus infects the Master
  812. Boot Record (MBR).
  813.  
  814. * Bob Miller @ 1:101/535
  815.  
  816. ALWAYS make sure you have a bootable disk handy incase of system failure.
  817. The simplest way to do this is to type "FORMAT A: /U /S" which formats the
  818. disk and transfers the system files to it.  You may want to copy other
  819. programs like FDISK, FORMAT, SCANDISK, etc. to the disk as well.
  820.  
  821. * jamie.hermans@tech-spk.alive.ampr.ab.ca
  822.   or FidoNet: Jamie Hermans @ 1:342/707
  823.  
  824. ────────────────────────────────────────────────────────────────────────────
  825.  
  826. Faster Booting
  827. ==============
  828. -> Added on October 30, 1994
  829.  
  830. Add the line "SWITCHES=/F" to the top of your CONFIG.SYS to remove a two
  831. second delay after the "Starting MS-DOS" message is displayed.  This works
  832. for DOS 6.0+ only.
  833.  
  834. * PC Computing - August 1994
  835.  
  836. ────────────────────────────────────────────────────────────────────────────
  837.  
  838. Hard-Drive Maintenance
  839. ======================
  840. -> Added on October 30, 1994
  841.  
  842. Here's a simple little batch file to optimize your hard drive.  It will run
  843. SANDISK which checks and repairs any errors, and finally defragment your
  844. hard drive.  It's a good idea to run this once a month or so.  Any more is
  845. redundant and any less may make each session take longer.  Of course, it all
  846. depends on how much file moving, creating, deleting, etc. you do.
  847.  
  848. This batch file assumes you are using MS-DOS 6.0 or higher, but could
  849. change SCANDISK and DEFRAG with your own prefered programs if you wish.
  850.  
  851. ... and obviously DON'T RUN THIS WHILE STILL IN WINDOWS!!!
  852.  
  853.     @echo OFF
  854.     C:\DOS\SCANDISK.EXE /ALL /AUTOFIX /NOSAVE /NOSUMMARY
  855.     DEL C:\SCANDISK.LOG
  856.     C:\DOS\DEFRAG.EXE C: /F /SN /H
  857.     CLS
  858.  
  859. * jamie.hermans@tech-spk.alive.ampr.ab.ca
  860.   or FidoNet: Jamie Hermans @ 1:342/707
  861.  
  862. ────────────────────────────────────────────────────────────────────────────
  863.  
  864. Expanding Files
  865. ===============
  866. -> Added on October 30, 1994
  867.  
  868. If you've ever had to manually expand a file from your Windows or MS-DOS
  869. disks, you know there's a lot of typing involved.  Usually, you have to use
  870. the format ...
  871.  
  872.     EXPAND Source Destination
  873.  
  874. Simply add the "-r" option before the source and it will automatically
  875. determine the ending filename.  This only works for files compressed using
  876. the "-r" option, but MS-DOS and Windows are almost always compressed this
  877. way.
  878.  
  879.     EXPAND -r Source [Destination]
  880.  
  881. In the above example, the destination is optional.  This way you could
  882. specify a different drive / directory for the destination.  If the source
  883. is multiple files and -r is not specified, [Destination] must be a
  884. directory.  Wildcards may not be used for the destination.
  885.  
  886. * jamie.hermans@tech-spk.alive.ampr.ab.ca
  887.   or FidoNet: Jamie Hermans @ 1:342/707
  888.  
  889. ────────────────────────────────────────────────────────────────────────────
  890.